<?php
set_time_limit(0); //防止执行超时
ob_end_clean();   //清空并关闭输出缓冲区


include("base_function.php");
include("base/db.php");

function doit()
{$addr[]="data_2014-01-31.txt";
$addr[]="data_2014-02-28.txt";
$addr[]="data_2014-03-31.txt";
$addr[]="data_2013-01-31.txt";
$addr[]="data_2013-02-28.txt";
$addr[]="data_2013-03-31.txt";
$addr[]="data_2013-04-30.txt";
$addr[]="data_2013-05-31.txt";
$addr[]="data_2013-06-30.txt";
$addr[]="data_2013-07-31.txt";
$addr[]="data_2013-08-31.txt";
$addr[]="data_2013-09-30.txt";
$addr[]="data_2013-10-31.txt";
$addr[]="data_2013-11-30.txt";
$addr[]="data_2013-12-31.txt";
$addr[]="data_2012-01-31.txt";
$addr[]="data_2012-02-29.txt";
$addr[]="data_2012-03-31.txt";
$addr[]="data_2012-04-30.txt";
$addr[]="data_2012-05-31.txt";
$addr[]="data_2012-06-30.txt";
$addr[]="data_2012-07-31.txt";
$addr[]="data_2012-08-31.txt";
$addr[]="data_2012-09-30.txt";
$addr[]="data_2012-10-31.txt";
$addr[]="data_2012-11-30.txt";
$addr[]="data_2013-00-29.txt";
$addr[]="data_2011-01-31.txt";
$addr[]="data_2011-02-28.txt";
$addr[]="data_2011-03-31.txt";
$addr[]="data_2011-04-30.txt";
$addr[]="data_2011-05-31.txt";
$addr[]="data_2011-06-30.txt";
$addr[]="data_2011-07-31.txt";
$addr[]="data_2011-08-31.txt";
$addr[]="data_2011-09-30.txt";
$addr[]="data_2011-10-31.txt";
$addr[]="data_2011-11-30.txt";
$addr[]="data_2011-12-31.txt";
$addr[]="data_2010-01-31.txt";
$addr[]="data_2010-02-28.txt";
$addr[]="data_2010-03-31.txt";
$addr[]="data_2010-04-30.txt";
$addr[]="data_2010-05-31.txt";
$addr[]="data_2010-06-30.txt";
$addr[]="data_2010-07-31.txt";
$addr[]="data_2010-08-31.txt";
$addr[]="data_2010-09-30.txt";
$addr[]="data_2010-10-31.txt";
$addr[]="data_2010-11-30.txt";
$addr[]="data_2010-12-31.txt";
$addr[]="data_2009-11-30.txt";
$addr[]="data_2009-12-31.txt";
foreach($addr as $a){
        $html = http_response("http://xinpan.zzhz.zjol.com.cn/txt/zhhq/".$a);
        $html = htmlspecialchars_decode($html,ENT_QUOTES);
        file_put_contents($a,$html);
    }
    return;
}

doit();
echo "ok";

?>
